1. Field of the Invention
The present invention relates to a communication apparatus that performs data communication with another apparatus via a relay apparatus and a method of controlling the same.
2. Description of the Related Art
Recently, there exist services that allow a user to upload image data obtained by a digital camera to a server on a public network so that other users can browse the image. The digital camera sometimes communicates with the server on the public network via a relay apparatus. Some relay apparatuses have a proxy function, while others do not.
A relay apparatus having the proxy function acts as the communication partner of a digital camera so as to receive and hold (cache) data. The relay apparatus proxy-transmits the data to a server as the communication partner on behalf of the digital camera. A relay apparatus having no proxy function relays data transmitted from a digital camera to a server as the communication partner.
Japanese Patent Laid-Open No. 2008-67192 (hereinafter referred to as patent document 1) describes an arrangement that causes a communication apparatus to transmit data to another communication apparatus via a relay apparatus having the proxy function. According to patent document 1, even when the communication between the communication apparatus and the other communication apparatus is disconnected, data transmission from the communication apparatus to the relay apparatus continues so that the relay apparatus receives and holds the transmitted data. When the communication between the communication apparatus and the other communication apparatus is restored, the relay apparatus proxy-transmits the held data to the other communication apparatus.
However, when communication between a relay apparatus having no proxy function and another communication apparatus is disconnected, the relay apparatus discards data regardless of continuous transmission from the communication apparatus. Hence, the communication apparatus need not continue data transmission.